<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="shortcut icon"  th:href="@{favicon.ico}"/>
    <link rel="stylesheet" href="layui/css/layui.css"  media="all">
    <script src="layui/jquery-3.5.1.min.js"></script>
    <script src="layui/layui.js" charset="utf-8"></script>

    <script>
        //修改资料
        $(function () {
            $("#changeinfos").click(function () {
                $("#changeInfo").click();
                $("#headers").css("height","70px")
            })
        })


        //JavaScript代码区域
        layui.use(['element','layer'], function(){
            var element = layui.element;
            var layer = layui.layer;


            var active = {
                tabAdd:function (name,url,layid) {
                    element.tabAdd('tabList', {
                        title: name //'选项卡的标题'
                        ,content: '<iframe id="iframeMain" style="width: 100%" ; height="100%" ;  frameborder="no" src="'+url+'"></iframe>'//'选项卡的内容' //支持传入html
                        ,id: layid//'选项卡标题的lay-id属性值'
                    });
                },
                tabChange:function (layid) {
                    element.tabChange('tabList', layid);
                },
                tabDelete:function (layid) {
                    element.tabDelete('tabList', layid);

                }
            }


            $(function () {
                active.tabAdd("我的日计划", "dailyplan/calendar", 1);
                active.tabChange(1)
                FrameWH();

                $(".layui-tab-title li[lay-id=1]").css("display","none")
            })


            $('.site-active').on("click", function () {
                var dataid = $(this);
                var name = dataid.attr("tab-name");
                var url = dataid.attr("tab-url");
                var tab_layid = dataid.attr("tab-layid");
                //1、 判断tab-layid=layid的tab页是否打开
                if ($(".layui-tab-title li[lay-id]").length <= 0) { //1.1 初始状态：1个Tab页也没有打开
                    active.tabAdd(name, url, tab_layid); //打开tab页
                    active.tabChange(tab_layid)//转到该tab页
                } else { //1.2   判断该Tab页是否已打开
                    var isData = false; //初始化一个标志，为false说明未打开该tab项 为true则说明已有
                    $.each($(".layui-tab-title li[lay-id]"), function () {
                        //如果点击左侧菜单栏所传入的id 在右侧tab项中的lay-id属性可以找到，则说明该tab项已经打开
                        if ($(this).attr("lay-id") == tab_layid) {
                            isData = true;
                        }
                    })
                    if (isData == false) {
                        //标志为false 新增一个tab项
                        active.tabAdd(name, url, tab_layid); //1.2.1  该Tab页未打开，则打开该tab页
                        active.tabChange(tab_layid)//1.2.2 转到该tab页
                    }else{
                        active.tabChange(tab_layid)//1.2.2 转到该tab页
                    }
                }
                FrameWH();  //计算ifram层的大小
            });
            function FrameWH() { //计算ifram层的大小
                var h = $(window).height()-175;
                $(".layui-show").css("height", h + "px");
            }

            $(window).resize(function () {
                FrameWH();
            })
        });

        function change(num) {
            $(".layui-nav-tree").css("display", "none");
            $("#menu"+num).css("display", "block");
        };

    </script>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?d214947968792b839fd669a4decaaffc";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <!--顶部导航-->
    <div class="layui-header">
        <div class="layui-logo">宝邯业务系统</div>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"  onclick="change('8')"><a>工作计划</a></li>
            <li class="layui-nav-item"  onclick="change('1')"><a>出差申请</a></li>
            <li class="layui-nav-item"  onclick="change('2')"><a>客户管理</a></li>
            <li class="layui-nav-item"  onclick="change('3')"><a>采购业务</a></li>
            <li class="layui-nav-item"  onclick="change('4')"><a>销售业务</a></li>
            <li class="layui-nav-item"  onclick="change('5')"><a>行政管理</a></li>
            <li class="layui-nav-item"  onclick="change('6')"><a>财务管理</a></li>
            <li class="layui-nav-item"  onclick="change('7')"><a>人事管理</a></li>
            <li class="layui-nav-item"  onclick="change('9')"><a>工作模板</a></li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:void(0);">
                    <img th:src="@{'/image/headers/'+${session.user.picture}}" class="layui-nav-img">
                    [[${session.user.name}]]
                </a>

                <dl class="layui-nav-child" id="headers" >
                    <dd><a href="javascript:void(0);" id="changeinfos">个人资料</a></dd>
                    <dd><a href="">通知管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/logout">退出</a></li>
        </ul>
    </div>

    <!--左边栏-->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" id="menu8">
                <li class="layui-nav-item">
                    <a style="cursor:pointer" class="site-active" tab-name="我的日计划" tab-url="dailyplan/calendar" tab-layid="1">我的日计划</a>
                    <a href="javascript:void(0);" id="changeInfo"style="cursor:pointer;display: none;" class="site-active" tab-name="修改资料" tab-url="personal/personInfoDetail" tab-layid="888888">修改资料</a>
                </li>
                <li class="layui-nav-item">
                    <a style="cursor:pointer" class="site-active" tab-name="我安排的计划" tab-url="dailyplan/arrangePlan" tab-layid="2">我安排的计划</a>
                </li>
            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu1">
                <li class="layui-nav-item">
                    <a style="cursor:pointer">出差申请</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active" style="cursor:pointer" tab-name="我的出差申请" tab-url="business-trip/table-applications" tab-layid="3">我的出差申请</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="出差申请" tab-url="business-trip/application" tab-layid="4">出差申请</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a style="cursor:pointer">订票申请</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active" style="cursor:pointer" tab-name="我的订票申请" tab-url="management/table-TicketApplications" tab-layid="5">我的订票申请</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="申请订票" tab-url="management/applicationsCanBuyTicket" tab-layid="6">申请订票</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a style="cursor:pointer">酒店预定申请</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active" style="cursor:pointer" tab-name="我的酒店预订" tab-url="management/table-HotelApplications" tab-layid="7">我的酒店预订</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="预订酒店" tab-url="management/applicationsCanBookHotel" tab-layid="8">预订酒店</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a style="cursor:pointer">派车申请</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active" style="cursor:pointer" tab-name="我的派车申请" tab-url="management/table-CarApplications" tab-layid="9">我的派车申请</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="申请派车" tab-url="management/applicationsCanBookCar" tab-layid="10">申请派车</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a style="cursor:pointer">报销申请</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active" style="cursor:pointer" tab-name="我的报销申请" tab-url="reimbursement/reimbursementByUser" tab-layid="11">我的报销申请</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="申请报销" tab-url="" tab-layid="12">申请报销</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active" style="cursor:pointer" tab-name="出差申请审核" tab-url="approve/approve" tab-layid="13">出差申请审核</a>

                </li>
            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu2">
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="客户信息管理" tab-url="customerInformation/customerList" tab-layid="17">客户信息管理</a>
                    <dl class="layui-nav-child">
                        <!--  <dd><a class="site-active"  style="cursor:pointer" tab-name="客户公司信息" tab-url="/customerInformation/enterpriseBasicInformation" tab-layid="18">客户公司信息</a></dd>
                          <dd><a class="site-active" style="cursor:pointer" tab-name="股东信息" tab-url="/customerInformation/shareholder" tab-layid="19">股东信息</a></dd>-->
                        <dd><a class="site-active" style="cursor:pointer" tab-name="业务联系人信息" tab-url="/customerInformation/businessContactsList" tab-layid="20">业务联系人信息</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="产品信息" tab-url="/customerInformation/productsList" tab-layid="21">产品信息</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="需求信息" tab-url="/customerInformation/demandsList" tab-layid="22">需求信息</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="授信管理" tab-url="" tab-layid="23">授信管理</a>
                </li>
            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu3">
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="采购项目列表" tab-url="purchase/procurementList" tab-layid="24">采购项目列表</a>
                </li>
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="采购模式选择" tab-url="purchase/initiatePurchase" tab-layid="28">采购模式选择</a>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="新建采购模板" tab-url="purchase/procurementTemplate" tab-layid="29">新建采购模板</a>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="风险评估" tab-url="" tab-layid="30">风险评估</a>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="询价" tab-url="" tab-layid="31">询价</a>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="成本测算" tab-url="" tab-layid="32">成本测算</a>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="合同签订" tab-url="" tab-layid="33">合同签订</a>-->
<!--                </li>-->
<!--                <li class="layui-nav-item">-->
<!--                    <a class="site-active"  style="cursor:pointer" tab-name="付款计划" tab-url="" tab-layid="34">付款计划</a>-->
<!--                </li>-->

            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu4">
                <li class="layui-nav-item">
                    <a>销售审核</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active" style="cursor:pointer" tab-name="经理审核" tab-url="" tab-layid="35">经理审核</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="部门审核" tab-url="" tab-layid="36">部门审核</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="财务审核" tab-url="" tab-layid="37">财务审核</a></dd>
                        <dd><a class="site-active" style="cursor:pointer" tab-name="运营审核" tab-url="" tab-layid="38">运营审核</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="销售模式选择" tab-url="" tab-layid="39">销售模式选择</a>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="新建销售模板" tab-url="" tab-layid="40">新建销售模板</a>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="风险评估" tab-url="" tab-layid="41">风险评估</a>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="询价" tab-url="/purchase/inquiry/inquiryXml" tab-layid="42">询价</a>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="成本测算" tab-url="" tab-layid="43">成本测算</a>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="合同签订" tab-url="" tab-layid="44">合同签订</a>
                </li>
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="付款计划" tab-url="" tab-layid="45">付款计划</a>
                </li>

            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu5">
                <li class="layui-nav-item">
                    <a>出差后勤</a>
                    <dl class="layui-nav-child">
                        <dd><a class="site-active"  style="cursor:pointer" tab-name="订票" tab-url="/management/allTicketApplicationsList" tab-layid="46">订票</a></dd>
                        <dd><a class="site-active"  style="cursor:pointer" tab-name="酒店" tab-url="/management/allHotelApplicationsList" tab-layid="47">酒店</a></dd>
                        <dd><a class="site-active"  style="cursor:pointer" tab-name="派车" tab-url="/management/bookingCarApplicationList" tab-layid="48">派车</a></dd>
                    </dl>
                </li>
            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu6">
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="资金计划" tab-url="capitalExpenditure/fund" tab-layid="49">资金计划</a>
                </li>

                <li class="layui-nav-item">
                    <a class="site-active" style="cursor:pointer" tab-name="报销申请" tab-url="reimbursement/reimbursementApplication" tab-layid="50">报销申请</a>
                </li>



            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu7">
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="入职管理" tab-url="personal/newcomer" tab-layid="51">入职管理</a>
                </li><li class="layui-nav-item">
                <a class="site-active"  style="cursor:pointer" tab-name="人员列表" tab-url="personal/personnel" tab-layid="52">人员列表</a>
            </li>
            </ul>
            <ul class="layui-nav layui-nav-tree" style="display: none" id="menu9">
                <li class="layui-nav-item">
                    <a class="site-active"  style="cursor:pointer" tab-name="工作模板管理" tab-url="work-template/tableTemplates" tab-layid="53">工作模板管理</a>
                </li>
            </ul>
        </div>
    </div>

    <!--主体div 用于放iframe-->
    <div class="layui-body" >
        <div class="layui-tab" lay-filter="tabList" lay-allowClose="true" >

            <ul class="layui-tab-title" style="margin-top: -10px">
                <!--                <li class="layui-this">日计划</li>-->
            </ul>
            <div class="layui-tab-content" >
                <!--                <div class="layui-tab-item layui-show" style="height: 100%">-->
                <!--                    <iframe src="/dailyplan/calendar" frameborder="0" id="ifameMain" style="width: 100%; height: 99%;" scrolling="no" frameborder="no"/>-->
                <!--                </div>-->
            </div>
        </div>

    </div>

    <!-- 底部固定区域 -->
    <div class="layui-footer">
        © https://www.wanmait.com
    </div>
</div>
</body>
</html>